1. Field of the Invention
The present invention relates to a technique of automatically acquiring network information from a network system, and in particular to a device and method for detecting network information such as subnet masks and router IP addresses from a local network.
2. Description of the Related Art
When one wishes to connect a computer to a network, it is necessary to acquire network information such as subnet masks, IP addresses and router addresses and set them into the computer. If the user has the knowledge of networks, such network information setting can be made manually but it would take time for acquiring necessary network information. Moreover, erroneously setting of network information may cause confusion in the entire network.
On the other hand, in the case where DHCP (Dynamic Host Configuration Protocol) server exists, network information can be automatically acquired from the DHCP server. However, to automatically acquire network information, a server aiming at providing network information must be installed.
Japanese Patent Application Unexamined Publication No. 2002-190811 discloses a method of automatically acquiring the IP addresses and subnet masks of devices on a network. According to this conventional method, when network information cannot be obtained from a DHCP server, an ICMP (Internet Control Message Protocol) address mask request is sent. Information is collected from monitored traffic on the network and replies generated to the ICMP request to determine an effective IP configuration. Within the determined subnet, unused IP addresses are detected and a default router is detected using an ICMP selection message.
In the conventional IP configuration acquisition method, however, the ICMP address mask request message is sent to the network and the reply to the request is used to detect the subnet mask. Accordingly, the load on the network is increased and it is difficult to speed up the subnet mask detection. In addition, the conventional router detection method merely employs the router IP address detection method described in RFC1256 without paying attention to speedups of router detection. Furthermore, since some routers do not provide support for ICMP router selection message, there are cases where the conventional method cannot detect routers.